{extend name="common/public" /}
{block name="content"}
{eq name="ADMINTYPE" value="1"}
<div class="am-form-group">
    <div class="am-btn-toolbar">
        <div class="am-btn-group am-btn-group-xs">
            <button type="button" onclick="openUrl('{:url("add_recycling",['type_id'=>$Request.param.type_id])}')" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button>
        </div>
    </div>
</div>
{/eq}
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">{$Request.param.name|default='回收子分类'}</div>
            <div class="widget-function am-fr">
                <a href="javascript:;;" class="am-icon-cog"></a>
            </div>
        </div>
        <form action="{:url()}">
            <select name="type_id" data-am-selected="{searchBox: 2}">
                  {foreach $type_list as $v}
                         <option value="{$v.id}"  {present name='$info.type_id' } {eq name="$info.type_id"  value="$v.id"}selected{/eq}{else /} {eq name="$type_id"  value="$v.id"}selected{/eq}{/present}>{$v.title}</option>
                    {/foreach}
            </select>
            <button type="submit" class="am-btn am-btn-xs am-btn-default am-btn-success"><span class="am-icon-search"></span> 确定</button>
        </form>
        <div class="widget-body  widget-body-lg am-fr">

            <table width="100%" class="am-table am-table-compact am-table-bordered tpl-table-black ">
                <thead>

                <tr>
                    <th class="am-lg-text-center" style="width: 5%">
                        序号
                    </th>
                    <th class="am-lg-text-center">
                        子分类名
                    </th>
                    <th class="am-lg-text-center">
                        描述
                    </th>
                    <th class="am-lg-text-center">
                        参考价格
                    </th>
                    <th class="am-lg-text-center">
                        单位
                    </th>
                    <th>操作</th>
                </tr>
                </thead>
                {foreach $list as $v}
                <tr class="gradeX">
                    <td class='am-lg-text-center'> {$v.id}</td>
                    <td class='am-lg-text-center'> {$v.name}</td>
                    <td class="am-lg-text-center"> {$v.describe}</td>
                    <td class="am-lg-text-center"> {$v.reference_price}</td>
                    <td class="am-lg-text-center"> {$v.unit}</td>
                    <td>
                        <div class="tpl-table-black-operation">
                            {eq name="ADMINTYPE" value="1"}
                            <a onclick="openUrl('{:url('edit_recycling',['id'=>$v['id'],'type_id'=>$v.type_id])}')">
                                <i class="am-icon-pencil"></i> 编辑
                            </a>
                            {/eq}
                            <a onclick="openUrl('{:url('setRecycling',['type_id'=>$v['id'],'name'=>$v['name']])}')">
                                <i class="am-icon-eye"></i> 区域价格管理
                            </a>
                        </div>
                    </td>
                </tr>
                {/foreach}
            </table>

        </div>
    </div>
</div>

{/block}
{/extend}